const path = require('path')
const activityDir = '/fundogroup_activity/'
const activityName = 'mileage'

function resolve (dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  baseUrl: activityDir + activityName,
  outputDir: activityName,
  chainWebpack: config => {
    config.resolve.alias
      .set('styles', resolve('src/assets/styles/'))
      .set('img', resolve('src/assets/img'))
      .set('common', resolve('src/common'))
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:3000',
        pathRewrite: { '^/api': '' }
      }
    }
  }
}
